﻿using System;
using System.Collections.Generic;
using TimeSplicerModule.DomainModels;

namespace TimeSplicerModule.Security
{
    public interface ISession
    {
        UserModel User { get; set; }
        List<ApplicationItemModel> ApplicationItems { get; set; }
        List<ApplicationPermissionModel> ApplicationPermissions { get; set; }
        List<PriorityModel> Priorities { get; set; }
        List<StatusModel> Statuses { get; set; }
    }


    public class Session : ISession
    {
        public UserModel User { get; set; }
        public List<ApplicationItemModel> ApplicationItems { get; set; }
        public List<ApplicationPermissionModel> ApplicationPermissions { get; set; }
        public List<PriorityModel> Priorities { get; set; }
        public List<StatusModel> Statuses { get; set; }

        // I think i need to create a method that denotes if users is allowed to Create/Edit/View based on the item passed in parameter
        // should make it easier to control the permission
    }
}
